<?php
if (isset($_SESSION['user_id'])) {
    require_once("{$CfgPara->root}/class/user_operate.class.php");
    $myUserOp = new user_operate($CfgPara->database);
    $opCount = $myUserOp->operate_count($_SESSION['user_id']);
    if (is_numeric($opCount) && $opCount > 0) {
        if (isset($InputData['page_change']) && is_numeric($InputData['page_change'])) {
            $page_index = $InputData['page_change'];
            $page_ex = '_page' . $viewEx;
        } else {
            $page_index = 1;
            $page_ex = $viewEx;
            $tittleText = '个人动态';
            require("{$viewRoot}tittle_back_bar{$viewEx}");
        }
        $opList = $myUserOp->operate_list($_SESSION['user_id'], $page_index, $CfgPara->pagesize, $CfgPara->httproot);
        if (is_string($opList)) {
            require("{$CfgPara->root}/view/warning_nocontent.app.v.php");
            goto page_end;
        }
        //连接分页类 在列表最后加入分页栏
        require_once("{$CfgPara->root}/class/paginate.class.php");
        $myPaginate = new paginate_c();
        $myPaginate->change_func = "op_page_change([x])";
        $paginateMsg = $myPaginate->paginate($page_index, ceil($opCount / $CfgPara->pagesize));
        require("{$viewRoot}user_operate_list{$page_ex}");
    } else {
        require("{$CfgPara->root}/view/warning_nocontent.app.v.php");
    }
} else {
    require("{$CfgPara->root}/controller/user_login.c.php");
}

page_end:;